#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pb push_back
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

typedef long long ll;
typedef double db;
typedef vector < int > vec;
typedef pair < int , int > pii;

int read() {
    int x = 0; bool f = 0; char ch = getchar(); while(!isdigit(ch)) f |= ch == '-',ch = getchar();
    while(isdigit(ch)) x = x * 10 + (ch ^ 48),ch = getchar(); return f ? -x : x;
}

const int N = 2e5 + 10;

int a[N], b[N], n, m, deg[N];
vec G[N];
int ans[N], cnt;

int main() {
#ifndef ONLINE_JUDGE
    freopen("1.in","r",stdin);
#endif
	n = in, m = in; rep(i, 1, m) a[i] = in, b[i] = in, G[a[i]].pb(b[i]), deg[b[i]]++;
	priority_queue < int, vector < int >, greater < int > > q;
	rep(i, 1, n) if(!deg[i]) q.push(i);
	
	while(q.size()) {
		int x = q.top(); q.pop(); ans[++cnt] = x;
		for(auto y : G[x]) if(--deg[y] == 0) q.push(y);
	}
	if(cnt != n) puts("-1");
	else rep(i, 1, n) printf("%d ", ans[i]);
}
